Skip to content

PENDING: phy: qcom: Fix PCIe PHY regulator voting causing suspend/resume crash - #1563

Open
Hariharan Sreedhar (hariharan-sree) wants to merge 3 commits into
qualcomm-linux:qcom-7.3-esfrom
hariharan-sree:pcie-phy-reg-voting-fix-7.3-es
Open

Hariharan Sreedhar (hariharan-sree) wants to merge 3 commits into
qualcomm-linux:qcom-7.3-esfrom
hariharan-sree:pcie-phy-reg-voting-fix-7.3-es

Conversation

@hariharan-sree

Copy link
Copy Markdown

The Nord PCIe PHY common block (vdda-phy-a/vdda-pll-a) was not being
voted when only a subset of ports (B/C/D) were enabled, and two Nord
boards had the vdda-pll-b/c/d-supply regulators mis-mapped onto the
same rail as vdda-pll-a. With the PHY's common/PLL supplies left
improperly voted, accessing the DBI register space during
suspend/resume causes a crash.

  • phy-qcom-qmp-pcie-multiphy.c: add vdda-phy-a/vdda-pll-a to the
    port B/C/D/CD/BCD regulator lists so the shared common-block supply
    is always voted regardless of which ports are active.
  • nord-ride-embedded.dts: fix vdda-pll-b/c/d-supply to point at
    vreg_l2e_0p9 instead of being aliased to vreg_l1e_0p9
    (vdda-pll-a's rail).
  • nord-rrd.dts: same regulator fix, plus removal of a duplicate
    &pcie_phy/&pcie0..3 override block further down in the file
    that re-applied the stale vreg_l1e_0p9 mapping via devicetree
    node merging, silently undoing the fix.

…es for all lane configs

The regulator lists for port B, C, D, CD and BCD only contained the
per-lane vdda-phy-x/vdda-pll-x supplies and never included the shared
vdda-phy-a/vdda-pll-a rails that back the common PCS/common block.

When a board enables only ports B, C or D (or a combination that does
not include port A), the shared vdda-phy-a/vdda-pll-a regulators are
never voted. The PHY common block, which backs the DBI register
space, is therefore left improperly powered. Accessing the DBI
registers from that under-voted rail during suspend/resume crashes.

Add vdda-phy-a and vdda-pll-a to the port B/C/D/CD/BCD regulator
lists so the shared supply is always voted whenever any of these
ports is active.

Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com>
…ply regulator mapping

vdda-pll-b-supply, vdda-pll-c-supply and vdda-pll-d-supply were
incorrectly mapped to vreg_l1e_0p9, the same rail already used by
vdda-pll-a-supply. With all four PLL rails tied to a single
regulator, the PHY's PLL supplies for lanes B/C/D are not voted on
their actual hardware regulator, leaving the PCIe PHY improperly
powered. This causes crashes when the DBI register space is
accessed during suspend/resume.

Point vdda-pll-b/c/d-supply at vreg_l2e_0p9, matching the board's
actual regulator assignment.

Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com>
…nd drop duplicate override

vdda-pll-b-supply, vdda-pll-c-supply and vdda-pll-d-supply were
incorrectly mapped to vreg_l1e_0p9, the same rail already used by
vdda-pll-a-supply, leaving the PCIe PHY's PLL supplies improperly
voted. Point them at vreg_l2e_0p9, matching the board's actual
regulator assignment.

The file also carried a second, duplicate &pcie_phy / &pcie0.. &pcie3
and &pcie0_port0.. &pcie3_port0 override block further down with the
same stale vdda-pll-b/c/d-supply = vreg_l1e_0p9 mapping. Since
devicetree merges same-labeled fragments in file order, this later
block silently re-applied the wrong mapping on top of the fix,
leaving the PHY under-voted and causing crashes when the DBI
register space is accessed during suspend/resume.

Drop the duplicate override block so the corrected mapping sticks.

Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com>
@qcomlnxci

Copy link
Copy Markdown

Test results

Workflow run: 45828587002 attempt 1

Known failures configured: 0

Target Pass Non-pass Total
kbdev-nord-rrd-multimedia 21 15 36

Test Matrix

Test Case kbdev-nord-rrd-multimedia
LAVA result ✅ Results
Audio_Card_Registration ⚠️ skip
BT_FW_KMD_Service ❌ Fail
BT_ON_OFF ❌ Fail
BT_SCAN ❌ Fail
CPUFreq_Validation ✅ Pass
CPU_affinity ✅ Pass
DSP_AudioPD ⚠️ skip
Ethernet_Basic_Validation ❌ Fail
Freq_Scaling ✅ Pass
GIC ✅ Pass
IPA ✅ Pass
Interrupts ✅ Pass
KVM_Driver ❌ Fail
KVM_EL2_DTB ❌ Fail
KVM_Infra ❌ Fail
OpenCV ✅ Pass
PCIe ✅ Pass
Probe_Failure_Check ❌ Fail
RMNET ✅ Pass
UFS_Validation ✅ Pass
USBHost ✅ Pass
WiFi_Firmware_Driver ✅ Pass
WiFi_OnOff ⚠️ skip
adsp_remoteproc ❌ Fail
cdsp_remoteproc ❌ Fail
gpdsp_remoteproc ⚠️ skip
hotplug ✅ Pass
irq ✅ Pass
kaslr ✅ Pass
pinctrl ✅ Pass
qcom_hwrng ✅ Pass
rngtest ✅ Pass
shmbridge ✅ Pass
smmu ❌ Fail
watchdog ✅ Pass
wpss_remoteproc ✅ Pass
Failure summary

Unexpected failures

  • kbdev-nord-rrd-multimedia: cdsp_remoteproc => fail.
  • kbdev-nord-rrd-multimedia: adsp_remoteproc => fail.
  • kbdev-nord-rrd-multimedia: gpdsp_remoteproc => skip.
  • kbdev-nord-rrd-multimedia: Probe_Failure_Check => fail.
  • kbdev-nord-rrd-multimedia: smmu => fail.
  • kbdev-nord-rrd-multimedia: Ethernet_Basic_Validation => fail.
  • kbdev-nord-rrd-multimedia: BT_FW_KMD_Service => fail.
  • kbdev-nord-rrd-multimedia: BT_SCAN => fail.
  • kbdev-nord-rrd-multimedia: BT_ON_OFF => fail.
  • kbdev-nord-rrd-multimedia: WiFi_OnOff => skip.
  • kbdev-nord-rrd-multimedia: DSP_AudioPD => skip.
  • kbdev-nord-rrd-multimedia: Audio_Card_Registration => skip.
  • kbdev-nord-rrd-multimedia: KVM_Driver => fail.
  • kbdev-nord-rrd-multimedia: KVM_EL2_DTB => fail.
  • kbdev-nord-rrd-multimedia: KVM_Infra => fail.

Result: blocked because unexpected failures were found.

@qlijarvis

Copy link
Copy Markdown

LAVA Failed Case Triage Summary

PR: #1563

Job 295040 | SoC iq10-nord

LAVA job: https://lava-oss.qualcomm.com/scheduler/job/295040

Failed test cases in LAVA job 295040 (SoC: iq10-nord).

  Case 1: ** cdsp_remoteproc
  1. Failed case: ** cdsp_remoteproc
  2. Root cause: ** Remoteproc firmware files (qcom/nord/cdsp.mbn, qcom/nord/adsp.mbn, qcom/nord/soccp.mbn) are missing from the target filesystem. The kernel requests firmware load during boot, but the files are not present in /lib/firmware/ or /vendor/firmware_mnt/image/, resulting in -ENOENT (error -2). All 4 CDSP instances (remoteproc2-5) and ADSP (remoteproc1) remain in offline state because firmware load is a prerequisite for remoteproc boot. This is a build artifact packaging or flash configuration issue, not a kernel code defect. PR PENDING: phy: qcom: Fix PCIe PHY regulator voting causing suspend/resume crash #1563 modifies only PCIe PHY regulator configuration and is not related to this failure.
  3. Possible fix: Verify the build includes the firmware partition or rootfs with the required .mbn files for iq10-nord. Flash a complete build image that includes both kernel and firmware artifacts. If using a custom build, ensure qcom/nord/cdsp.mbn, qcom/nord/adsp.mbn, and qcom/nord/soccp.mbn are present in the firmware search path (/lib/firmware/ or /vendor/firmware_mnt/image/). Re-trigger the LAVA job with a properly packaged build. This is not a code fix — it is a build/flash configuration correction.
  4. Detail analysis attachment: failed_case_job295040_1_detailed.md
  Case 2: ** Remoteproc Firmware Load Failure — adsp_remoteproc
  1. Failed case: ** Remoteproc Firmware Load Failure — adsp_remoteproc
  2. Root cause: ** The ADSP remoteproc (remoteproc1) failed to boot because the firmware file qcom/nord/adsp.mbn is missing from the rootfs /lib/firmware/ directory. The kernel's firmware loader returned error -2 (ENOENT - file not found) during boot at timestamp 7.102s. This is a test infrastructure issue specific to the iq10-nord LAVA test image, not a kernel regression. The same pattern affects CDSP (remoteproc2-5) and SOCCP (remoteproc0), all missing their respective firmware files.
  3. Possible fix: Add the missing ADSP firmware file qcom/nord/adsp.mbn (and any required split binaries .b00, .b01, etc.) to the LAVA test image's /lib/firmware/qcom/nord/ directory. Update the rootfs build recipe or LAVA overlay to include the complete Qualcomm firmware package for iq10-nord. This is a CI infrastructure fix, not a kernel code change. PR PENDING: phy: qcom: Fix PCIe PHY regulator voting causing suspend/resume crash #1563 (which modifies only PCIe PHY regulator code) is unrelated to this failure and should not be blocked by it.
  4. Detail analysis attachment: failed_case_job295040_2_detailed.md
  Case 3: Probe_Failure_Check
  1. Failed case: Probe_Failure_Check
  2. Root cause: Test detected pre-existing probe failures on iq10-nord platform: remoteproc firmware files (soccp.mbn, adsp.mbn, cdsp.mbn) not packaged in rootfs (expected platform limitation), Aquantia Ethernet PHY probe failure (-EBUSY), display firmware (gen71300_sqe.fw) missing, and sound card DAI name resolution error—none related to the PR's PCIe PHY regulator mapping changes for different boards.
  3. Possible fix: These are pre-existing platform issues unrelated to the PR changes; the PR modifies PCIe PHY regulator mappings for nord-ride-embedded and nord-rrd boards and does not introduce new probe failures—mark as false positive for this PR validation.
  4. Detail analysis attachment: failed_case_job295040_3_detailed.md
  Case 4: smmu
  1. Failed case: smmu
  2. Root cause: Could not be determined confidently from available logs.
  3. Possible fix: Update the device tree for iq10-nord to add the missing reg property to the /reserved-memory/reservation-iris node, or suppress this benign warning in the smmu test script by filtering out known non-fatal DT schema warnings that do not affect SMMU functionality.
  4. Detail analysis attachment: failed_case_job295040_4_detailed.md
  Case 5: Ethernet_Basic_Validation
  1. Failed case: Ethernet_Basic_Validation
  2. Root cause: Aquantia AQR113C Ethernet PHY firmware initialization failure on iq10-nord — the PHY returns -EBUSY when the qcom-ethqos driver attempts to read VEND1_GLOBAL_FW_ID during probe and later when attaching to the PHY, preventing both eth0 (1a00000.ethernet) and eth1 (1a80000.ethernet) from coming up administratively.
  3. Possible fix: This is a pre-existing Ethernet PHY firmware/hardware issue unrelated to the PR (which modifies PCIe PHY regulators). Investigate Aquantia AQR113C PHY firmware loading on iq10-nord: verify PHY firmware is present in /lib/firmware, check PHY reset/power sequencing in DT, and review if the PHY requires additional initialization time or a board-specific quirk. If this is a known board/infra issue, suppress this test for iq10-nord or mark it as expected failure until the PHY firmware/hardware issue is resolved.
  4. Detail analysis attachment: failed_case_job295040_5_detailed.md
  Case 6: ** BT_FW_KMD_Service
  1. Failed case: ** BT_FW_KMD_Service
  2. Root cause: ** WCN7850 Bluetooth firmware initialization fails repeatedly with HCI command 0xfc00 timeout (-110 ETIMEDOUT) during QCA version information read. The Bluetooth controller hci0 never completes setup, resulting in an invalid BD address (00:00:00:00:00:00) and unusable runtime state. This is a genuine hardware/firmware communication failure, not a test infrastructure issue.
  3. Possible fix: This failure is NOT introduced by the PR (PR only touches PCIe PHY regulator mappings for nord-ride-embedded, unrelated to Bluetooth). The root cause is a pre-existing platform issue on iq10-nord: the wcn7850-pmu power sequencer reports "supply vddio1p2 not found, using dummy regulator" at boot, indicating incomplete power supply configuration in the device tree. Add the missing vddio1p2-supply property to the wcn7850-pmu node in the iq10-nord device tree, pointing to the correct 1.2V regulator rail. Verify the UART connection between the SoC and WCN7850 is functional and that the WCN7850 firmware files are present in /lib/firmware/ath12k/WCN7850/hw2.0/.
  4. Detail analysis attachment: failed_case_job295040_6_detailed.md
  Case 7: BT_ON_OFF
  1. Failed case: BT_ON_OFF
  2. Root cause: WCN7850 Bluetooth initialization failure due to missing vddio1p2 regulator supply in device tree — power sequencer falls back to dummy regulator, leaving Bluetooth hardware improperly powered, causing HCI command 0xfc00 to timeout (-ETIMEDOUT) during QCA version read.
  3. Possible fix: Add vddio1p2-supply property to the wcn7850-pmu device tree node in arch/arm64/boot/dts/qcom/nord-rrd.dts, mapping it to the correct board regulator (likely vreg_l* or vreg_s* rail per board schematic), following the same pattern as the PCIe PHY regulator fixes in this PR.
  4. Detail analysis attachment: failed_case_job295040_7_detailed.md
  Case 8: BT_SCAN — Bluetooth Firmware Communication Failure
  1. Failed case: BT_SCAN — Bluetooth Firmware Communication Failure
  2. Root cause: WCN7850 Bluetooth firmware fails to initialize due to HCI command 0xfc00 (QCA version read) timing out repeatedly with error -110 (ETIMEDOUT). The wcn7850-pmu power sequencer is using a dummy regulator for vddio1p2 supply, indicating a missing or misconfigured power rail. The PR modifies PCIe PHY regulator mappings on the same platform (iq10-nord / nord-ride-embedded), and while the PR targets PCIe lanes B/C/D, the WCN7850 combo chip (Bluetooth + WiFi) shares platform power infrastructure and may be affected by regulator topology changes or DT regulator node availability.
  3. Possible fix: Verify that the WCN7850 DT node's vddio1p2-supply property points to a valid regulator phandle (not missing or pointing to a disabled regulator node). Cross-check whether vreg_l1e_0p9 or vreg_l2e_0p9 (modified in the PR) are shared dependencies for WCN7850 power sequencing. If vddio1p2 is intentionally optional, investigate whether the dummy regulator path causes the HCI command transport layer to fail. Add debug instrumentation to btqca driver (drivers/bluetooth/btqca.c) around qca_send_pre_shutdown_cmd() and qca_read_soc_version() to capture the exact failure point in the firmware handshake sequence.
  4. Detail analysis attachment: failed_case_job295040_8_detailed.md
  Case 9: KVM Driver Initialization Failure — /dev/kvm unavailable (platform limitation)
  1. Failed case: KVM Driver Initialization Failure — /dev/kvm unavailable (platform limitation)
  2. Root cause: The iq10-nord platform boots with Gunyah hypervisor enabled at EL2, which virtualizes the Linux kernel at EL1. KVM requires direct EL2/HYP mode access to function. The kernel correctly detects "HYP mode not available" (dmesg line 3.899790) and aborts KVM initialization, leaving /dev/kvm absent. This is NOT a regression from PR PENDING: phy: qcom: Fix PCIe PHY regulator voting causing suspend/resume crash #1563 (PCIe PHY regulator fixes); it is a pre-existing platform configuration where KVM is incompatible with Gunyah-enabled boot flow.
  3. Possible fix: Mark KVM tests as "not applicable" or "skip" for iq10-nord when Gunyah hypervisor is enabled. Update LAVA job definition to conditionally skip KVM test suite on platforms where Gunyah is active. Alternatively, if KVM testing is required, boot iq10-nord without Gunyah (if supported by the platform) or use a different platform that exposes EL2 directly to the kernel.
  4. Detail analysis attachment: failed_case_job295040_9_detailed.md
  Case 10: KVM_EL2_DTB — KVM unavailable (platform configuration)
  1. Failed case: KVM_EL2_DTB — KVM unavailable (platform configuration)
  2. Root cause: KVM driver reports "HYP mode not available" because the iq10-nord platform is running under Gunyah hypervisor (gunyah-auto-cbce97f50), which owns EL2. The Linux kernel runs as a guest at EL1 and cannot access EL2 hypervisor mode required for KVM operation. CONFIG_KVM is enabled but /dev/kvm device node is never created because kvm_init() exits early when is_hyp_mode_available() returns false.
  3. Possible fix: This is a known platform limitation, not a regression. KVM tests (KVM_Driver, KVM_EL2_DTB, KVM_Infra) should be skipped on iq10-nord when Gunyah hypervisor is active. Add a LAVA job definition filter to exclude KVM test suite when the target platform is iq10-nord or when hypervisor boot logs indicate Gunyah is running. The PR (PCIe PHY regulator fixes) is unrelated and should not be blocked by this pre-existing platform constraint.
  4. Detail analysis attachment: failed_case_job295040_10_detailed.md
  Case 11: KVM_Infra
  1. Failed case: KVM_Infra
  2. Root cause: /dev/kvm is not present because the KVM kernel module did not create the device node after detecting HYP mode unavailability.
  3. Possible fix: Add platform detection logic to the KVM test suite to skip KVM_Driver, KVM_EL2_DTB, and KVM_Infra tests when running under a hypervisor (detect via /sys/hypervisor/type or check for Gunyah based bootup in dmesg). Alternatively, mark these tests as "expected skip" for iq10-nord and other Gunyah-based platforms in the LAVA job definition.
  4. Detail analysis attachment: failed_case_job295040_11_detailed.md
  Case 12: KVM_Infra
  1. Failed case: KVM_Infra
  2. Root cause: KVM infrastructure test failed because HYP (EL2) mode is not available on the iq10-nord platform, preventing KVM initialization and /dev/kvm device creation. The kernel message "kvm [1]: HYP mode not available" indicates the bootloader or secure firmware did not enable EL2 access, or the platform does not support virtualization extensions.
  3. Possible fix: This is a pre-existing platform/firmware limitation unrelated to the PR (which only changes PCIe PHY regulator mappings). If KVM support is required on iq10-nord, update the bootloader/firmware to enable EL2 mode. Otherwise, skip KVM tests on this platform or mark them as expected failures for boards without virtualization support.
  4. Detail analysis attachment: failed_case_job295040_12_detailed.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants